package com.xjrsoft.module.visual.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xjrsoft.module.visual.entity.XjrVisualHomeRelation;
import com.xjrsoft.module.visual.mapper.XjrVisualHomeRelationMapper;
import com.xjrsoft.module.visual.service.IXjrVisualHomeRelationService;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2021-03-10
 */
@Service
    public class XjrVisualHomeRelationServiceImpl extends ServiceImpl<XjrVisualHomeRelationMapper, XjrVisualHomeRelation> implements IXjrVisualHomeRelationService {

    @Override
    public XjrVisualHomeRelation getHomeRelationByUserId(String userId) {
        return this.getOne(Wrappers.<XjrVisualHomeRelation>query().lambda()
                .eq(XjrVisualHomeRelation::getUserId, userId), false);
    }
}
